Updated to include local functions#117
Merged
Merged
Conversation
| * Don’t repeat the name of a class or enumeration in its members (AV1710) | ||
| * Avoid short names or names that can be mistaken with other names (AV1712) | ||
| * Name methods using verb-object pair (AV1720) | ||
| * Name methods and local functions using verbs or verb-object pairs (AV1720) |
Owner
There was a problem hiding this comment.
Hmm, when would a local function be named using just a verb?
Contributor
Author
There was a problem hiding this comment.
I consider LFs similar to methods in that they perform an operation. Examples would then be: Initialize/InitializeFields, Prepare/PrepareDocument, Calculate/CalculateSalesRates, Reassign/ReassignWork etc.
| Name a method or local function using a verb like `Show` or a verb-object pair such as `ShowDialog`. A good name should give a hint on the *what* of a member, and if possible, the *why*. | ||
|
|
||
| Also, don't include `And` in the name of a method. It implies that the method is doing more than one thing, which violates the single responsibility principle explained in AV1115. | ||
| Also, don't include `And` in the name of a method or local function. That implies that it is doing more than one thing, which violates the single responsibility principle explained in AV1115. |
Contributor
Author
There was a problem hiding this comment.
Sure, will update. #resolved
mapfel
pushed a commit
to stepahead/CSharpGuidelines
that referenced
this pull request
Mar 22, 2021
* Updated to include local functions * caps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #108.